package com.lazydong.apiforward.gateway.config;

import io.netty.handler.ssl.SslContext;
import io.netty.handler.ssl.SslContextBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.net.ssl.SSLException;

@Configuration
public class TrustCertConfig {

    @Bean
    public SslContext sslContext() throws SSLException {
        return SslContextBuilder.forClient().trustManager(new TrustAllCerts()).build();
    }
}
